Repository navigation
feat(validation): add a one-command local validation run - #471
Merged
Merged
Conversation
Node's walk-up resolution let the parser conformance helper pick up any js-yaml in a parent directory when validation/node_modules is absent, silently changing P-037 results. The helper now resolves from CAMARA_NODE_MODULES or validation/node_modules and fails when js-yaml is not there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
Adds
validation/scripts/validate_local.py, which runs the full CAMARA Validation orchestrator against a local clone of an API repository with one command. Until now a local run needed the venv,npm ci,node_modules/.binon PATH, nineVALIDATION_*variables and a settings override, none of it documented. The Node install can now live outside the checkout:CAMARA_NODE_MODULES(or aspectralon PATH inside anode_modules/.bin) is used by the script, the Spectral and bundling tests and the YAML parser conformance helper (P-037).python3 validation/scripts/validate_local.py <repo-path>prints the result and the findings per file, and exits 0 / 1 / 2 for pass or advisory / fail / error.spectralis first on PATH.js-yamlfrom a parent directory whenvalidation/node_modulesis absent; it uses the pinned version or fails visibly.Which issue(s) this PR fixes:
n/a
Special notes for reviewers:
The run is a
workflow_dispatchrun of the checked-out branch with a shipped settings override (validation/scripts/local-validation-settings.yaml) that enables validation for any repository. The ruleset followsrelease-plan.yaml, as in CI. Rules that need PR context do not fire locally, so the PR check remains the authoritative result. Againstcamaraproject/ReleaseTestmain the script reports advisory with 6 hints..gitignorenow ignoresnode_moduleswithout the trailing slash, so a symlinked install is ignored too.Changelog input
Additional documentation